.class public Lcom/estrongs/android/pop/app/compress/CompressionActivity;
.super Lcom/estrongs/android/pop/esclasses/ESNoDisplayActivity;
.source "CompressionActivity.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/pop/esclasses/ESNoDisplayActivity;-><init>()V

    return-void
.end method

.method private a(Landroid/net/Uri;)Ljava/lang/String;
    .locals 9

    const/4 v0, 0x1

    const/4 v1, 0x0

    :try_start_0
    new-array v4, v0, [Ljava/lang/String;

    const-string v0, "_display_name"

    const/4 v8, 0x0

    aput-object v0, v4, v8

    .line 2
    invoke-virtual {p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v2

    const/4 v5, 0x0

    const/4 v6, 0x0

    const/4 v7, 0x0

    move-object v3, p1

    invoke-virtual/range {v2 .. v7}, Landroid/content/ContentResolver;->query(Landroid/net/Uri;[Ljava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object p1
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_1
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    if-eqz p1, :cond_0

    .line 3
    :try_start_1
    invoke-interface {p1}, Landroid/database/Cursor;->moveToFirst()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 4
    invoke-interface {p1, v8}, Landroid/database/Cursor;->getString(I)Ljava/lang/String;

    move-result-object v0
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0
    .catchall {:try_start_1 .. :try_end_1} :catchall_1

    move-object v1, v0

    goto :goto_1

    :catch_0
    move-exception v0

    goto :goto_0

    :catchall_0
    move-exception v0

    goto :goto_2

    :catch_1
    move-exception v0

    move-object p1, v1

    .line 5
    :goto_0
    :try_start_2
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V
    :try_end_2
    .catchall {:try_start_2 .. :try_end_2} :catchall_1

    .line 6
    :cond_0
    :goto_1
    invoke-static {p1}, Lcom/estrongs/fs/util/f;->a(Landroid/database/Cursor;)V

    return-object v1

    :catchall_1
    move-exception v0

    move-object v1, p1

    :goto_2
    invoke-static {v1}, Lcom/estrongs/fs/util/f;->a(Landroid/database/Cursor;)V

    .line 7
    throw v0
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/compress/CompressionActivity;)V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/compress/CompressionActivity;->u()V

    return-void
.end method

.method private b(Ljava/lang/String;)V
    .locals 1

    .line 1
    new-instance v0, Lcom/estrongs/android/pop/app/compress/CompressionActivity$c;

    invoke-direct {v0, p0, p1}, Lcom/estrongs/android/pop/app/compress/CompressionActivity$c;-><init>(Lcom/estrongs/android/pop/app/compress/CompressionActivity;Ljava/lang/String;)V

    invoke-virtual {p0, v0}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method private f(I)V
    .locals 1

    .line 1
    new-instance v0, Lcom/estrongs/android/pop/app/compress/CompressionActivity$b;

    invoke-direct {v0, p0, p1}, Lcom/estrongs/android/pop/app/compress/CompressionActivity$b;-><init>(Lcom/estrongs/android/pop/app/compress/CompressionActivity;I)V

    invoke-virtual {p0, v0}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method private f(Z)V
    .locals 1

    .line 2
    new-instance v0, Lcom/estrongs/android/pop/app/compress/CompressionActivity$d;

    invoke-direct {v0, p0, p1}, Lcom/estrongs/android/pop/app/compress/CompressionActivity$d;-><init>(Lcom/estrongs/android/pop/app/compress/CompressionActivity;Z)V

    invoke-virtual {p0, v0}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V

    return-void
.end method

.method private u()V
    .locals 8

    .line 1
    invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const/4 v1, 0x0

    const-string v2, "islocalopen"

    .line 2
    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v2

    if-nez v2, :cond_0

    .line 3
    invoke-static {}, Lcom/estrongs/android/statistics/b;->b()Lcom/estrongs/android/statistics/b;

    move-result-object v2

    const-string v3, "act3"

    const-string v4, "zip_viewer"

    .line 4
    invoke-virtual {v2, v3, v4}, Lcom/estrongs/android/statistics/b;->b(Ljava/lang/String;Ljava/lang/String;)V

    :cond_0
    const-string v2, "archive_file_name"

    .line 5
    invoke-virtual {v0, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    const/4 v4, 0x1

    if-nez v3, :cond_7

    .line 6
    invoke-virtual {v0}, Landroid/content/Intent;->getData()Landroid/net/Uri;

    move-result-object v3

    if-nez v3, :cond_1

    const v0, 0x7f1106a4

    .line 7
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/compress/CompressionActivity;->f(I)V

    .line 8
    invoke-virtual {p0}, Landroid/app/Activity;->finish()V

    return-void

    .line 9
    :cond_1
    invoke-virtual {v3}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v5

    invoke-static {v5}, Landroid/net/Uri;->decode(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v5

    const-string v6, "content://"

    .line 10
    invoke-virtual {v5, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_4

    .line 11
    invoke-direct {p0, v4}, Lcom/estrongs/android/pop/app/compress/CompressionActivity;->f(Z)V

    const/4 v5, 0x0

    :try_start_0
    const-string v6, "application/x-gzip"

    .line 12
    invoke-virtual {v0}, Landroid/content/Intent;->getType()Ljava/lang/String;

    move-result-object v7

    invoke-virtual {v6, v7}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v6

    if-eqz v6, :cond_2

    .line 13
    invoke-direct {p0, v3}, Lcom/estrongs/android/pop/app/compress/CompressionActivity;->a(Landroid/net/Uri;)Ljava/lang/String;

    move-result-object v5

    :cond_2
    if-nez v5, :cond_3

    .line 14
    invoke-virtual {v0}, Landroid/content/Intent;->getType()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Lcom/estrongs/android/util/n0;->a(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    .line 15
    new-instance v5, Ljava/lang/StringBuilder;

    invoke-direct {v5}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {}, Lcom/estrongs/fs/util/f;->a()Ljava/lang/String;

    move-result-object v6

    invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v5

    .line 16
    :cond_3
    invoke-virtual {p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v0

    invoke-virtual {v0, v3}, Landroid/content/ContentResolver;->openInputStream(Landroid/net/Uri;)Ljava/io/InputStream;

    move-result-object v0

    .line 17
    new-instance v3, Ljava/lang/StringBuilder;

    invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V

    const-string v6, "tmp/"

    invoke-virtual {v3, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-static {v3}, Lcom/estrongs/fs/util/f;->e(Ljava/lang/String;)Ljava/io/File;

    move-result-object v3

    .line 18
    invoke-static {v0, v3}, Lcom/estrongs/fs/util/f;->a(Ljava/io/InputStream;Ljava/io/File;)V

    .line 19
    invoke-virtual {v3}, Ljava/io/File;->getAbsolutePath()Ljava/lang/String;

    move-result-object v3
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    .line 20
    invoke-direct {p0, v1}, Lcom/estrongs/android/pop/app/compress/CompressionActivity;->f(Z)V

    goto :goto_1

    .line 21
    :catch_0
    invoke-direct {p0, v1}, Lcom/estrongs/android/pop/app/compress/CompressionActivity;->f(Z)V

    const v0, 0x7f1106ab

    .line 22
    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/compress/CompressionActivity;->f(I)V

    .line 23
    invoke-virtual {p0}, Landroid/app/Activity;->finish()V

    return-void

    :cond_4
    const-string v0, "file:///"

    .line 24
    invoke-virtual {v5, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_6

    const-string v0, "FILE:///"

    invoke-virtual {v5, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_5

    goto :goto_0

    :cond_5
    move-object v3, v5

    goto :goto_1

    :cond_6
    :goto_0
    const/4 v0, 0x7

    .line 25
    invoke-virtual {v5, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;

    move-result-object v3

    .line 26
    :cond_7
    :goto_1
    invoke-static {v3}, Lcom/estrongs/android/util/n0;->V(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_8

    const v0, 0x7f1106aa

    .line 27
    invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    new-array v2, v4, [Ljava/lang/Object;

    .line 28
    invoke-static {v3}, Lcom/estrongs/android/util/h0;->y(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v3

    aput-object v3, v2, v1

    invoke-static {v0, v2}, Ljava/text/MessageFormat;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p0, v0}, Lcom/estrongs/android/pop/app/compress/CompressionActivity;->b(Ljava/lang/String;)V

    .line 29
    invoke-virtual {p0}, Landroid/app/Activity;->finish()V

    return-void

    .line 30
    :cond_8
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/estrongs/android/pop/view/FileExplorerActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const/high16 v1, 0x24000000

    .line 31
    invoke-virtual {v0, v1}, Landroid/content/Intent;->addFlags(I)Landroid/content/Intent;

    .line 32
    invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 33
    invoke-virtual {p0, v0}, Landroid/app/Activity;->startActivity(Landroid/content/Intent;)V

    .line 34
    invoke-virtual {p0}, Landroid/app/Activity;->finish()V

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 0

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/pop/esclasses/ESNoDisplayActivity;->onCreate(Landroid/os/Bundle;)V

    const p1, 0x7f0c002d

    .line 2
    invoke-virtual {p0, p1}, Landroidx/appcompat/app/AppCompatActivity;->setContentView(I)V

    .line 3
    new-instance p1, Lcom/estrongs/android/pop/app/compress/CompressionActivity$a;

    invoke-direct {p1, p0}, Lcom/estrongs/android/pop/app/compress/CompressionActivity$a;-><init>(Lcom/estrongs/android/pop/app/compress/CompressionActivity;)V

    invoke-static {p1}, Lcom/estrongs/android/util/o;->a(Ljava/lang/Runnable;)V

    return-void
.end method
